# -*- encoding: utf-8 -*-
'''
@File    :   10.py
@Time    :   2022/11/09 12:44:22
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib

# 10 编写一个函数cacluate, 可以实现2个数的运算(加,减 乘,除)

#第一个参数是数字，第二个数字是符号，第三个参数是数字
def calculate(arg1,arg2,arg3):
    if(arg2 == "+"):
        return arg1+arg3
    elif(arg2 == "-"):
        return arg1-arg3
    elif(arg2 == "*"):
        return arg1*arg3
    elif(arg2 == "/"):
        return arg1/arg3
    else:
        print("您输入的字符有误！")
        return

print(calculate(1,"+",2))
print(calculate(1,"-",2))
print(calculate(1,"*",2))
print(calculate(1,"/",2))

